var Koa=require("koa");
var router=require("koa-router")();
var nunjucks=require("nunjucks");
var views=require("koa-views");
var app=new Koa();
app.use(views(__dirname+"/html",{
    map:{html:'nunjucks'}
}))
router.get("/",async ctx=>{
    await ctx.render("index",{
        title:"标题",
        content:"内容"
    })
})
router.get("/list",async ctx=>{
    await ctx.render("index",{
        title:"标题2",
        content:"内容2"
    })
})
app.use(router.routes());
app.listen("1000",()=>{
    console.log('成功')
})


